Microwave filters GUI  2.0.3
Public Member Functions | List of all members
mwfiltersgui.MatrixEditDlg Class Reference

GUI dialog to edit coupling matrix. More...

Public Member Functions

def __init__
 Constructor: Creates dialog window to edit current coupling matrix.
def udpateTopology
 Fill in Matrix topology table from values in self.mainWindow.CM.MatQ.
def getTopologyFlags
 Return matrices of flags that describe the topology of the real part and the imaginary part of the coupling matrix, based on the entries in the topology table.
def topologyItemClicked
 Update the contents of self.topology_tableWidget after the user has clicked an item.
def setMatrixSize
 Set maximum row and column indices in matrixEditDlg spinBoxes, according to size of self.mainWindow.CM.MatQ.M.
Functions automatically excuted when the user interacts with the GUI
def dialogChanged
 Custom slot in Qt designer connected to widgets "changed" signal.
def on_edit_listWidget_itemDoubleClicked
 Load coupling matrix saved in backup list.
def on_undo_pushButton_clicked
 Undo last edit action from edit actions list.
def on_clear_pushButton_clicked
 Clear edit actions list.
def on_apply_pushButton_clicked
 Apply selected action to the matrix.
def closeEvent
 Reimplementation of the window close function.

Detailed Description

GUI dialog to edit coupling matrix.

Definition at line 2161 of file mwfiltersgui.py.

Constructor & Destructor Documentation

def mwfiltersgui.MatrixEditDlg.__init__ (   self,
  parent 
)

Constructor: Creates dialog window to edit current coupling matrix.

        @param parent = Parent widget, in this case is coupling matrix mainWindow.

Copy of the coupling matrix mainWindow class instance. It is necessary to store a copy since it must be accessed by some member functions. String that explains the last edit action. This is what is pushed into the edit action list after edit actions. Shallow copy of the CM.bkpMatQ list, for easier access. Shallow copy of the CM.bkpActionslist, for easier access. Variable to store a list of widgets with bad input. Only when this list is empty, he "Accept" and "Compute" buttons are enabled. Text corresponding to couplings type in topology table Colors corresponding to couplings type in topology table Variable to store the modified/unmodifed status of the dialog widgets. The dialogChanged() method is automatically called when the user modifies the edit widgets contents and sets this variable to True. This variable must be set to False at the end of the init dialog constructor, since dialogChanged() is called when the constructor sets the edit widgets contents. This attribute is defined in this class only for compatibility with the dialogChanged() method, which has been copied literally (except for the name of pushButtons) from ParamEditDlg class.

Definition at line 2168 of file mwfiltersgui.py.

References mwfiltersgui.MatrixEditDlg.badInput, mwfiltersgui.MatrixEditDlg.bkpActions, libcommonfunc.CouplingMatrices.bkpActions, mwfiltersgui.MatrixEditDlg.bkpMatQ, libcommonfunc.CouplingMatrices.bkpMatQ, mwfiltersgui.MatrixEditDlg.dialogModified, mwfiltersgui.MatrixEditDlg.lastEditAction, dbplot.DbPlot.mainWindow, mwfiltersgui.SpecMask.mainWindow, dbplot.AxisScalingDlg.mainWindow, mwfiltersgui.HelpForm.mainWindow, dbplot.EditCurvesDlg.mainWindow, mwfiltersgui.SetCouplingDlg.mainWindow, mwfiltersgui.MatrixEditDlg.mainWindow, mwfiltersgui.MatrixEditDlg.setMatrixSize(), mwfiltersgui.SetCouplingDlg.topolColors, mwfiltersgui.MatrixEditDlg.topolColors, mwfiltersgui.MatrixEditDlg.topology_tableWidget, mwfiltersgui.MatrixEditDlg.topologyItemClicked(), mwfiltersgui.SetCouplingDlg.topolText, mwfiltersgui.MatrixEditDlg.topolText, and mwfiltersgui.MatrixEditDlg.udpateTopology().

Here is the call graph for this function:

Member Function Documentation

def mwfiltersgui.MatrixEditDlg.closeEvent (   self,
  event 
)

Reimplementation of the window close function.

Sets couplingMatrixDlg toolbar Edit action to unchecked.

Definition at line 2648 of file mwfiltersgui.py.

def mwfiltersgui.MatrixEditDlg.dialogChanged (   self)

Custom slot in Qt designer connected to widgets "changed" signal.

This function is automatically executed by the GUI every time the user changes dialog values, and sets the self.dialogModified variable to True.

Definition at line 2433 of file mwfiltersgui.py.

References mwfiltersgui.MatrixEditDlg.badInput, and mwfiltersgui.MatrixEditDlg.dialogModified.

def mwfiltersgui.MatrixEditDlg.getTopologyFlags (   self)

Return matrices of flags that describe the topology of the real part and the imaginary part of the coupling matrix, based on the entries in the topology table.

Returns
topologyReal = Numpy matrix of Bool type that has True values for elements with non-zero real part.
topologyImag = Numpy matrix of Bool type that has True values for elements with non-zero imag part.
topologySignReal = Int numpy array having -1,1 or 0 values at the position of coupling matrix entries with negative, positive or any real part, respectively.
topologySignImag = Int numpy array having -1,1 or 0 values at the position of coupling matrix entries with negative, positive or any imaginary part, respectively.

Definition at line 2341 of file mwfiltersgui.py.

References mwfiltersgui.MatrixEditDlg.topology_tableWidget.

Referenced by mwfiltersgui.MatrixEditDlg.on_apply_pushButton_clicked().

Here is the caller graph for this function:

def mwfiltersgui.MatrixEditDlg.on_apply_pushButton_clicked (   self,
  checked 
)

Apply selected action to the matrix.

The coupling matrix self.dirty attribute is set to True.

Definition at line 2528 of file mwfiltersgui.py.

References mwfiltersgui.MatrixEditDlg.getTopologyFlags(), mwfiltersgui.MatrixEditDlg.lastEditAction, libcommonfunc.listStr(), and libcommonfunc.myPrint().

Here is the call graph for this function:

def mwfiltersgui.MatrixEditDlg.on_clear_pushButton_clicked (   self,
  checked 
)

Clear edit actions list.

Clears edit action list and the backup Qmatrices list.

Definition at line 2503 of file mwfiltersgui.py.

References mwfiltersgui.MatrixEditDlg.bkpActions, libcommonfunc.CouplingMatrices.bkpActions, mwfiltersgui.MatrixEditDlg.bkpMatQ, and libcommonfunc.CouplingMatrices.bkpMatQ.

def mwfiltersgui.MatrixEditDlg.on_undo_pushButton_clicked (   self,
  checked 
)

Undo last edit action from edit actions list.

Pops the edit action list and the backup Qmatrices list.

Definition at line 2479 of file mwfiltersgui.py.

References mwfiltersgui.MatrixEditDlg.bkpMatQ, libcommonfunc.CouplingMatrices.bkpMatQ, libcommonfunc.copy(), and libcommonfunc.myPrint().

Here is the call graph for this function:


The documentation for this class was generated from the following file: